package dreamCookGame;

import java.awt.Component;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Image;
import java.awt.Insets;
import java.awt.Point;
import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.JLayeredPane;
import javax.swing.JPanel;
import javax.swing.JRootPane;

public class Main {

    private static void setup() {
        //Create and set up the window.
       JFrame frame = new JFrame();
       Controller controller = new Controller();
       frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
       Container contentPane = frame.getContentPane();
       contentPane.add(controller._mainScreen);
       frame.setGlassPane(controller._eventHandler);
       frame.getGlassPane().setVisible(true);

       	//Custom cursor  
       Toolkit toolkit = Toolkit.getDefaultToolkit();  
       Image image = toolkit.getImage("resources/images/BearPawCursor.png");   
       Point hotSpot = new Point(20,15);
       Cursor cursor = toolkit.createCustomCursor(image, hotSpot, "bearPaw");  
       frame.setCursor(cursor); 
       
       
        //Display the window.
        frame.setResizable(false);
        frame.setTitle("Dream Cook");
        frame.pack();
        Insets border = frame.getInsets();
        frame.setSize(800+border.left+border.right, 600+border.top+border.bottom);
        frame.setVisible(true);
    }

	public static void main(String[] args) {
        //Schedule a job for the event-dispatching thread:
        //creating and showing this application's GUI.
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                setup();
            }
        });
    }
}
